From: Andrew Cooper Date: Wed, 7 Nov 2018 12:25:19 +0000 (+0000) Subject: x86/soft-reset: Drop gfn reference after calling get_gfn_query() X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~2852 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=e7969e917cef276318f722a607985a2e896aeb94;p=xen.git x86/soft-reset: Drop gfn reference after calling get_gfn_query() get_gfn_query() internally takes the p2m lock, and this error path leaves it locked. This wasn't included in XSA-277 because the error path can only be triggered by a carefully timed phymap operation concurrent with the domain being paused and the toolstack issuing DOMCTL_soft_reset. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 295b10c48c..b4d59487ad 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -725,7 +725,7 @@ int arch_domain_soft_reset(struct domain *d) printk(XENLOG_G_ERR "Failed to get Dom%d's shared_info GFN (%lx)\n", d->domain_id, gfn); ret = -EINVAL; - goto exit_put_page; + goto exit_put_gfn; } new_page = alloc_domheap_page(d, 0);